package com.ruoyi.grape.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.grape.mapper.GrapeTechMapper;
import com.ruoyi.grape.domain.GrapeTech;
import com.ruoyi.grape.service.IGrapeTechService;

/**
 * 文章Service业务层处理
 * 
 * @author ld
 * @date 2023-11-18
 */
@Service
public class GrapeTechServiceImpl implements IGrapeTechService 
{
    @Autowired
    private GrapeTechMapper grapeTechMapper;

    /**
     * 查询文章
     * 
     * @param techId 文章主键
     * @return 文章
     */
    @Override
    public GrapeTech selectGrapeTechByTechId(Long techId)
    {
        return grapeTechMapper.selectGrapeTechByTechId(techId);
    }

    /**
     * 查询文章列表
     * 
     * @param grapeTech 文章
     * @return 文章
     */
    @Override
    public List<GrapeTech> selectGrapeTechList(GrapeTech grapeTech)
    {
        return grapeTechMapper.selectGrapeTechList(grapeTech);
    }

    /**
     * 新增文章
     * 
     * @param grapeTech 文章
     * @return 结果
     */
    @Override
    public int insertGrapeTech(GrapeTech grapeTech)
    {
        return grapeTechMapper.insertGrapeTech(grapeTech);
    }

    /**
     * 修改文章
     * 
     * @param grapeTech 文章
     * @return 结果
     */
    @Override
    public int updateGrapeTech(GrapeTech grapeTech)
    {
        return grapeTechMapper.updateGrapeTech(grapeTech);
    }

    /**
     * 批量删除文章
     * 
     * @param techIds 需要删除的文章主键
     * @return 结果
     */
    @Override
    public int deleteGrapeTechByTechIds(Long[] techIds)
    {
        return grapeTechMapper.deleteGrapeTechByTechIds(techIds);
    }

    /**
     * 删除文章信息
     * 
     * @param techId 文章主键
     * @return 结果
     */
    @Override
    public int deleteGrapeTechByTechId(Long techId)
    {
        return grapeTechMapper.deleteGrapeTechByTechId(techId);
    }
}
